Skip to content

feat(cli): add version check to studio/serve commands#1131

Merged
christso merged 2 commits intomainfrom
feat/1128-version-check-studio
Apr 17, 2026
Merged

feat(cli): add version check to studio/serve commands#1131
christso merged 2 commits intomainfrom
feat/1128-version-check-studio

Conversation

@christso
Copy link
Copy Markdown
Collaborator

Summary

  • Enforce required_version from .agentv/config.yaml before starting AgentV Studio (agentv studio / agentv serve), matching the existing agentv eval behavior.
  • Interactive (TTY) runs prompt "Update now? (Y/n)"; non-interactive runs warn to stderr and continue.
  • Single-project scope only — multi-project server deployments remain out of scope (tracked in feat(cli): self update should update the same binary location (local vs global) #1127).

Implementation

apps/cli/src/commands/results/serve.ts — call enforceRequiredVersion() (from version-check.ts) before the server is started, using loadConfig() + findRepoRoot() to locate the project's .agentv/config.yaml (same pattern as run-eval.ts:988-992).

The check runs after benchmark-management subcommands (--add / --remove / --discover) so those paths aren't affected.

Red/Green UAT

Red (on main): agentv studio with a mismatched required_version: ">=99.0.0" launched silently — no warning, no prompt. Output:

No results found. Dashboard will show an empty state.
Run an evaluation to see results: agentv eval <eval-file>
Dashboard: http://localhost:31170
Benchmarks API: http://localhost:31170/api/benchmarks
Press Ctrl+C to stop

Green (this branch):

  1. Non-interactive (stdin redirected) with required_version: ">=99.0.0":

    STDERR:
    Warning: This project requires agentv >=99.0.0 but you have 4.20.0.
      Run `agentv self update` to upgrade.
    

    Server starts normally after the warning.

  2. Interactive TTY (via script), user answers n:

    Warning: This project requires agentv >=99.0.0 but you have 4.20.0.
    ? Update now? (Y/n) n
    ✔ Update now? No
    No results found. Dashboard will show an empty state.
    Dashboard: http://localhost:31172
    

    User declines; server starts as before.

  3. Satisfying range (required_version: ">=4.0.0"): no warning, no prompt — server starts silently.

  4. No .agentv/config.yaml: no warning, server starts silently.

Test plan

  • Existing serve unit tests (39 tests) pass
  • Typecheck, build, lint, full test suite (via pre-push hooks)
  • Manual UAT: red/green above

Closes #1128

Enforce `required_version` from `.agentv/config.yaml` before starting
Studio so the dashboard matches `agentv eval` behavior. Interactive
TTY prompts to update; non-interactive warns to stderr and continues.

Closes #1128
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Apr 17, 2026

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: f78f824
Status: ✅  Deploy successful!
Preview URL: https://567e0b5e.agentv.pages.dev
Branch Preview URL: https://feat-1128-version-check-stud.agentv.pages.dev

View logs

Address review feedback: reflect the new startup-time version
enforcement in the module's header JSDoc, and reword the inline
comment to describe the multi-project limitation without referencing
an external issue number.
@christso christso marked this pull request as ready for review April 17, 2026 02:41
@christso christso merged commit ef22041 into main Apr 17, 2026
4 checks passed
@christso christso deleted the feat/1128-version-check-studio branch April 17, 2026 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(cli): add version check to agentv studio/serve commands

1 participant